// import { Select } from "antd"
import { FC } from "react"

//import { useOptions } from "@/hooks/useOptions"
import { SFormItem } from "@/components/common"
import StyleSelect from "@/components/common/styleSelect"
import { DICT_DEFAULT_CONFIG as dict } from "@/constants/dict"
import { useLocale } from "@/locales"

export const ProxyLevelList: FC<any> = props => {
	const { rules, disable, labelProps, selectorProps, fieldName } = props
	const { formatMessage } = useLocale()
	const data = dict.proxyLevelList
	const options = data.map(item => ({ value: item.value, label: item.value }))

	return (
		<SFormItem
			name={fieldName ?? "accountLevelList"}
			label={`${formatMessage({ id: "report.proxy_level" })}:`}
			rules={rules}
			{...labelProps}
		>
			<StyleSelect
				placeholder={formatMessage({ id: "label.select_all" })}
				allowClear
				options={options}
				disable={disable}
				{...selectorProps}
			/>
		</SFormItem>
	)
}
